<%@ page import="com.psl.model.custom" %>
<%@ page import="com.psl.model.userlogin" %>
<%@ page import="com.psl.services.work.list.CustomServices" %>
<%@ page import="java.util.Iterator" %>
<%@ page import="java.util.List" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
    int c_id= Integer.parseInt(request.getParameter("c_id"));
    userlogin userinfo = (userlogin) session.getAttribute("user");
    if (userinfo == null) {
        response.sendRedirect("/login.do");
    }%>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <link href="/assets/css/text.css" rel="stylesheet" type="text/css">
    <link href="/assets/css/main.css" rel="stylesheet" type="text/css">
    <link href="/assets/css/content.css" rel="stylesheet" type="text/css">
    <script language="javascript" src="/assets/js/common.js"></script>
    <script language="javascript" src="/assets/js/general.js"></script>
    <script language="JavaScript" type="text/JavaScript">
    </script>
    <style>
        #title {
            width: 92%;
            border: 0px;
            margin-bottom: 10px;
        }

        #title td {
            text-align: center;
            height: 20px;
            line-height: 150%
        }

        #title div {
            background-image: url(/assets/img/dot_02.gif);
            background-position: left top;
            background-repeat: no-repeat;
            margin: 0 auto;
            padding-left: 20px;
            text-align: left;
            width: 10%;
            font-size: 15px;
            font-weight: bold;
            color: #CC0000;
            letter-spacing: 2px;
        }

        a{
            color: black;
        }
    </style>
</head>
<body>
<table cellspacing="0" cellpadding="0" id="title" align="center">
    <tbody>
    <tr>
        <td nowrap="nowrap">
            <div>客户详细资料修改</div>
        </td>
    </tr>
    </tbody>
</table>

<jsp:useBean id="customservices" class="com.psl.services.work.list.CustomServices"/>
<%
    CustomServices cs = new CustomServices();
    List c = cs.Acustom(c_id);
    Iterator iter = c.iterator();
    custom cust = null;
    while (iter.hasNext()) {
        cust = (custom) iter.next();%>
<form action="/Customupdate.do" method="post" name="form1" id="form1">
    <table width="99%" border="0"  cellpadding="3" cellspacing="1" bgcolor="#AEDEF4">
        <tbody>
        <tr>
            <td height="25"  bgcolor="#FFF9DF">客户名称</td>
            <td colspan="3" align="left" bgcolor="#FFFFFF" class="t5"><input name="c_name" type="text" id="c_name" value="<%=cust.getC_name()%>"></td>
            <td align="left" bgcolor="#FFF9DF" class="t5">客户地址</td>
            <td colspan="3" align="left" bgcolor="#FFFFFF" class="t5"><input name="c_addr" type="text" id="c_addr" value="<%=cust.getC_addr()%>"></td>
        </tr>
        <tr>
            <td height="25"  bgcolor="#FFF9DF">客户固定电话</td>
            <td colspan="3" bgcolor="#FFFFFF" class="t5"><input name="c_tel" type="text" id="c_tel" value="<%=cust.getC_tel()%>"></td>
            <td bgcolor="#FFF9DF" class="t5">客户手机</td>
            <td bgcolor="#FFFFFF" class="t5" colspan="4"><input name="c_phone" type="text" id="c_phone" value="<%=cust.getC_phone()%>"></td>
        </tr>
        <tr>
            <td width="10%" height="25"  bgcolor="#FFF9DF">负责人</td>
            <td bgcolor="#FFFFFF" class="t5"><input name="c_contact" type="text" id="c_contact" value="<%=cust.getC_contact()%>">
            </td>
            <td  bgcolor="#FFF9DF" class="t5">国家</td>
            <td bgcolor="#FFFFFF" class="t5">
                <select name="c_status">
                    <%if (cust.getC_status()==1){%>
                    <option value="">正在交易</option>
                    <option value="">潜在</option>
                    <option value="">联系中</option>
                    <option value="">已报价</option>
                    <%}if (cust.getC_status()==2){%>
                    <option value="">潜在</option>
                    <option value="">正在交易</option>
                    <option value="">联系中</option>
                    <option value="">已报价</option>
                    <%}if (cust.getC_status()==3){%>
                    <option value="">联系中</option>
                    <option value="">潜在</option>
                    <option value="">正在交易</option>
                    <option value="">已报价</option>
                            <%}if (cust.getC_status()==4){%>
                    <option value="">已报价</option>
                    <option value="">潜在</option>
                    <option value="">正在交易</option>
                    <option value="">联系中</option>
                    <%}%>
                </select>
            </td>
            <td bgcolor="#FFF9DF" class="t5">
               Email
            </td>
            <td  bgcolor="#FFFFFF" class="t5">
                <input name="c_email" type="email" value="<%=cust.getC_email()%>">
            </td>
        </tr>
        <tr>
            <td height="25" colspan="8" align="center" bgcolor="#FFFFFF"><label>
                <input type="submit" name="Submit" value="保存">
            </label></td>

        </tr>
        </tbody>
    </table>
</form>
<%}%>
</body>
</html>